package com.sunfeng.chap14;

import java.nio.ByteBuffer;

public class Test1_2 {
    public static void main(String[] args) {
        long currentTimeMillis = System.currentTimeMillis();
        ByteBuffer allocate = ByteBuffer.allocateDirect(Integer.MAX_VALUE);
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            allocate.put((byte) 123);
        }
        long end = System.currentTimeMillis();
        System.out.println(end-currentTimeMillis);
    }
}
